<html>
	<head>
		<title>getTestData</title>
		<meta http-equiv="Content-type" content="text/html;charset=utf-8">
		<script type="text/javascript" src="../scripts/coos.js"></script>
		<script type="text/javascript" src="../scripts/coos.ext.ajax.js"></script>
	</head>
<body>
	<div id="testDiv">
		<h1>测试例子</h1>
	</div>
	
	<script type="text/javascript">
	function getTestData()
	{
		var url = "../getData?action=getTestData";
		coos.ajax.get(url,getCallback,{test1:'aaa1',test2:'bbb1'});
	}
	function getCallback(responseText,test1,test2)
	{
		var data = responseText.toJson();
		var div = document.createElement("div");
		div.style.color = "red";
		div.innerHTML = "success = " + data.success + " ,action = " + data.action;
		document.getElementById("testDiv").appendChild(div);
	
	}
	coos.onloadEvent(getTestData);
	</script>
</body>
</html>